package com.fr.plugin;

import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
import com.fr.plugin.context.PluginContexts;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.script.AbstractFunction;
import com.fr.stable.fun.Authorize;

@EnableMetrics
@Authorize(callSignKey = MyFunctionConstants.PLUGIN_ID)
public class MyJSCss extends AbstractFunction  {

    @Focus(id = "com.fr.plugin.function.js.css.inject", text = "Plugin-Test_JS_CSS", source = Original.PLUGIN)
    public Object run(Object[] args) {
        if (!PluginContexts.currentContext().isAvailable()) {
            return "Error:authorization is expired.";
        }
        return "hello fafa";
    }
}
